package com.lagou.homework.dao;

import com.lagou.homework.pojo.AuthCode;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;


public interface ValidateCodeDao extends JpaRepository<AuthCode,Integer> {
    @Query(value = "select * from lagou_auth_code where email = ?1 order by createtime desc limit 1",nativeQuery = true)
    public AuthCode findBySql(String email);
}
